﻿<!DOCTYPE html>
<html lang="zh-CN" ng-app="taoqiApp">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    <meta name="description" content="天然气行业第三方交易平台">
    <meta name="keywords" content="517淘气网，天然气交易平台，天然气物流，天然气行情">
    <title>求购报价</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>

    <!--[if lt IE 9]>
      <script src="js/html5shiv.min.js" defer async="async"></script>
      <script src="js/respond.min.js" defer async="async"></script>
    <![endif]-->
    <style>
        select {
            -moz-appearance: none;
            -webkit-appearance: none;
            background: url(images/select.png) scroll right no-repeat;
        }

            select::-ms-expand {
                display: none;
            }

        #quoteModal .col-md-4, .col-md-5, .col-md-7, .col-md-1 {
            padding-left: 0;
        }
        .form-control {
            background: url(images/select.png) scroll right no-repeat;
            font-size:13px;
        }

        .gasInformation{
            margin-right: 4px;
        }
        #quoteModal th {
            font-weight:normal;
        }
    </style>

</head>

<body ng-controller="baseController" ng-init="InitByCookie()">
    <div id="placeHolderHeader" ng-include src="headerHtml"></div>
    <div class="container" id="mainBody">
        <div>
            <!--卖气报价区域-->
            <div class="tableStyle1">
                <div class="titleBar">
                    <img class="titleBarimg" src="images/titleBarimg.png" />
                </div>
                <!--查询区域-->
                <div id="searchBar" class="borderStyle6" ng-init="isSearch=true;">
                    <form class="form-inline">
                        <div class="form-group" style="margin-top:0.5em;">
                            <label class="overflow">到岸地</label>
                            <div class="searchBar dropdown inline">
                                <div class="landSearch overflow" data-toggle="dropdown" data-target="#" style="width:150px;">
                                    <span ng-if="entity.LandName" ng-bind="entity.LandName"></span>
                                    <span ng-if="!entity.LandName" class="colorGray">请选择到岸地</span>
                                    <span class="dropDownRight">
                                        <img src="images/select.png" style="margin-top:-0.2em;margin-right:-0.28em;" />
                                    </span>
                                </div>
                                <div id="land" class="dropdown-menu panel" data-panel='plants'>
                                    <ul class="nav nav-tabs">
                                        <li ng-class="{active:tabLand===0}"><a data-toggle="tab" data-target="#" ng-click="getProvinces($event)">省份</a></li>
                                        <li ng-class="{active:tabLand===1}"><a data-toggle="tab" data-target="#" ng-click="getCities($event)">城市</a></li>
                                        <li ng-class="{active:tabLand===2}"><a data-toggle="tab" data-target="#" ng-click="getCounties($event)">县区</a></li>
                                    </ul>
                                    <ul class="nav nav-pills">
                                        <li ng-repeat="item in baseData.Province" ng-if="tabLand === 0">
                                            <a ng-click="provinceSelect($event, item)">{{item.C_ProvinceName}}</a>
                                        </li>
                                        <li ng-repeat="item in cities" ng-if="tabLand === 1">
                                            <a ng-click="citySelect($event, item)">{{item.C_CityName}}</a>
                                        </li>
                                        <li ng-repeat="item in counties" ng-if="tabLand === 2">
                                            <a ng-click="countySelect(item)">{{item.C_CountyName}}</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label>类别</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.C_GasTypeID"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.GasType">
                                <option value="">不限</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>品种</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.C_GasVarietyID"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.GasVariety">
                                <option value="">不限</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>气化率</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.GasificationRateRange"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.GasificationRate">
                                <option value="">不限</option>
                            </select>
                        </div>
                        <!--<div class="form-group">
                            <label>热值</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.CalorificValueRange"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.CalorificValue">
                                <option value="">不限</option>
                            </select>
                        </div>-->
                        <div class="form-group">
                            <label>液温</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.C_LiquidTemperature"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.LiquidTemperature">
                                <option value="">不限</option>
                            </select>
                        </div>
                        <div class="form-group onecontrols">
                            <label>用户类型</label>
                            <select class="searchBar" ng-change="search()" ng-model="entity.C_UserType"
                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.UserType">
                                <option value="">不限</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <button type="button" class="btn btnOrange" ng-click="cancelSearch()">清除选择</button>
                        </div>
                    </form>
                </div>

                <div class="table-responsive" style="overflow-x:visible;" ng-controller="quoteController">
                    <!-- Table -->
                    <table class="table blueTable addright" data-ng-init="getQuoteList()" id="quoteList">
                        <thead>
                            <tr>
                                <th>企业星级</th>
                                <th>求购内容</th>
                                <th>到岸地点</th>
                                <!--<th ng-click="search(null,'C_Quantity')" class="hand">
                                    数量（车）
                                    <img src="images/grid_arrow_Down.jpg" ng-if="orderBy=='C_Quantity' && orderDirection=='desc'" />
                                    <img src="images/grid_arrow_Up.jpg" ng-if="orderBy=='C_Quantity' && orderDirection=='asc'" />
                                    <img src="images/grid_arrow_Normal.jpg" ng-if="orderBy!='C_Quantity'" />
                                </th>-->
                                <th>发布时间</th>
                                <th>要求到岸时间</th>
                                <th>报价截止时间</th>
                                <th ng-click="search(null,'C_Status')" class="hand">
                                    交易状态
                                    <img src="images/grid_arrow_Down.jpg" ng-if="orderBy=='C_Status' && orderDirection=='desc'" />
                                    <img src="images/grid_arrow_Up.jpg" ng-if="orderBy=='C_Status' && orderDirection=='asc'" />
                                    <img src="images/grid_arrow_Normal.jpg" ng-if="orderBy!='C_Status'" />
                                </th>
                                <th class="col-md-1">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="item in QuoteList">
                                <td ng-bind-html="item.C_Ranking | rankingFilter"></td>
                                <td class="textCenter positionRealative hoverMenu">
                                    <a href="#" data-toggle="dropdown">
                                        {{item.GasTypeName}}、{{item.GasVarietyName}}、{{item.GasificationRateRangeName}}、{{item.CalorificValueRangeName}}、{{item.LiquidTemperatureName}}、{{item.UserTypeName}}{{item.RemarkName}}
                                    </a>
                                    <div class="dropdown-menu tooltipDetail">
                                        <div>求购类型：{{item.GasTypeName}}</div>
                                        <div>品种：{{item.GasVarietyName}}</div>
                                        <div>气化率：{{item.GasificationRateRangeName}}</div>
                                        <div>热值：{{item.CalorificValueRangeName}}</div>
                                        <div>液温：{{item.LiquidTemperatureName}}</div>
                                        <div>备注：{{item.C_Remark}}</div>
                                        <div>场站名称：{{item.C_StationShortName}}（{{item.C_Address}}）</div>
                                        <div>场站类型：{{item.UserTypeName}}</div>
                                        <div>场站总罐容：{{item.C_StationCapacity}}立方</div>
                                        <div>日均供气量：{{item.C_DailyConsumption1}}公斤</div>
                                        <div>日均供气量：{{item.C_DailyConsumption2}}方</div>
                                    </div>
                                </td>
                                <td class="textCenter">
                                    {{item.C_ProvinceName}}{{item.C_CityName}}<br />{{item.C_CountyName}}{{item.C_Address}}<br />
                                    <div ng-show="item.C_BaiduPosition">
                                        <div class="icon icon_location"></div><a href="/map.html?position={{item.C_BaiduPosition}}" style="color:#ff0707">地图查看</a>
                                    </div>
                                </td>
                                <!--<td class="textCenter" ng-bind="item.C_Quantity"></td>-->
                                <td class="textCenter">{{item.DATE_ENTERED | date:'yyyy-MM-dd HH:mm'}}</td>
                                <td class="textCenter">{{item.C_ArriveTime | date:'yyyy-MM-dd HH:mm'}}</td>
                                <td class="textCenter">{{item.C_ValidityTime | date:'yyyy-MM-dd HH:mm'}}</td>
                                <td class="textCenter price">
                                    <div ng-if="item.C_Status==1">等待报价</div>
                                    <div class="silverFont">有<span class="colorOrange">{{item.C_Totle}}</span>个报价</div>
                                </td>
                                <td class="textCenter">
                                    <div class="btnRed" ng-if="item.QuoteStatus===0" data-toggle="modal"
                                         ng-click="addQuotePrice($index)" style="border-radius:0px;">报价</div>
                                    <div class="btnRed" ng-if="item.QuoteStatus===1" data-toggle="modal"
                                         ng-click="editQuotePrice($index)" style="border-radius:0px;">编辑报价</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div id="loading"><img src="/images/loading.gif" /></div>
                    <div>
                        <ul class="pagination">
                            <li>
                                <a href="#" ng-click="paging(1)">
                                    <span aria-hidden="true">首页</span>
                                </a>
                            </li>
                            <li ng-class="{'disabled':currentPageIndex == 1}">
                                <a href="#" aria-label="Previous" ng-click="search(-1,null,pageTotal)">
                                    <span aria-hidden="true">上一页</span>
                                </a>
                            </li>
                            <li ng-repeat="item in pageList" ng-class="{'active':item == currentPageIndex}"><a href="#" ng-click="paging(item)">{{item}}</a></li>
                            <li ng-class="{'disabled':currentPageIndex == pageTotal}">
                                <a href="#" aria-label="Next" ng-click="search(1,null,pageTotal)">
                                    <span aria-hidden="true">下一页</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" ng-click="paging(pageTotal)">
                                    <span aria-hidden="true">末页</span>
                                </a>
                            </li>
                        </ul>
                        <div class="pagingTotal">共{{pageTotal}}页</div>
                    </div>

                    <div class="modal fade" id="quoteModal" tabindex="-1" role="dialog">
                        <div class="modal-dialog" role="document" style="width:650px;">
                            <div class="modal-content">
                                <div class="modal-header" style="background-color:#0065e6;">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="background-color: #004ca3;margin-top:-5px;opacity:1;color:white;border-radius:15px;padding-left:1px;"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" style="color:white;letter-spacing:16px;margin-top:-3px;">报价</h4>
                                </div>
                                <div class="modal-body">
                                    <div class="form-horizontal">
                                        <div class="row form-group">
                                            <div class="col-md-4" id="gaspublish">
                                                <label class="control-label col-md-3" style="width: 43%;padding-left:2px;padding-right:17px;margin-left:15px;margin-right:-12px;"><span class="colorRed">*</span>气源地：</label>
                                                <div class="form-control col-md-4 dropdown" style="width: 54%;padding-left:1px;">
                                                    <div class="overflow" data-toggle="dropdown" data-target="#" style="padding-left:8px;">
                                                        <span ng-if="model.DeliveryName" ng-bind="model.DeliveryName"></span>
                                                        <span ng-if="!model.DeliveryName" class="colorGray">请选择气源地</span>
                                                        <span class="dropDownRight2">
                                                        </span>
                                                    </div>
                                                    <div data-panel='plants' class="dropdown-menu deliveryPanel" ng-if="model.C_GasVarietyID != '2'">
                                                        <ul class="nav nav-tabs">
                                                            <li ng-repeat="item in regions" ng-class="{active:tabGasSource===$index}"><a ng-click="GetPlants($event, item)" data-toggle="tab" data-target="#">{{item}}</a></li>
                                                            <li ng-class="{active:tabGasSource === -1}"><a ng-click="plantSelect2()" style="color: #ff3e0a;">其他</a></li>
                                                        </ul>
                                                        <ul class="nav nav-pills">
                                                            <li ng-repeat="item in plants"><a ng-click="plantSelect2(item)">{{item.C_GasSourceName}}</a></li>
                                                        </ul>
                                                    </div>
                                                    <div class="dropdown-menu deliveryPanel" ng-if="model.C_GasVarietyID === '2'">
                                                        <ul class="nav nav-pills">
                                                            <li ng-repeat="item in baseData.Wharf"><a ng-click="plantSelect2(item)">{{item.C_GasSourceName}}</a></li>
                                                            <li><a ng-click="plantSelect2()"><span class="colorRed">其他</span></a></li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-4">
                                                <div ng-class="{'has-error':gas.rate.$dirty && gas.rate.$invalid}">
                                                    <label class="control-label col-md-5" style="padding-left:0px;"><span class="colorRed">*</span>气化率：</label>
                                                    <input type="text" name="rate" class="form-control col-md-7" style="background-image:none;padding-left:8px;margin-left:-12px;width:53.5%;" ng-model="model.C_GasificationRate" maxlength="5" ng-pattern="/^\d+$/" required />
                                                    <div class="glyphicon glyphicon-ok form-glyphicon" ng-show="gas.rate.$dirty && gas.rate.$valid"></div>
                                                    <div class="glyphicon glyphicon-remove form-glyphicon" ng-show="gas.rate.$dirty && gas.rate.$invalid"></div>
                                                </div>
                                            </div>
                                            <div class="col-md-4" style="padding-right:0">
                                                <div ng-class="{'has-error':gas.calorific.$dirty && gas.calorific.$invalid}">
                                                    <label class="control-label col-md-5" style="padding-left:0px;padding-right:1.5px;">热值：</label>
                                                    <input type="text" name="calorific" class="form-control col-md-7" style="background-image: none; margin-left: 0px;width:48.5%;padding-left:8px;" ng-model="model.C_CalorificValue" maxlength="5" ng-pattern="/^\d+$/">
                                                    <div class="glyphicon glyphicon-ok form-glyphicon" ng-show="gas.calorific.$dirty && gas.calorific.$valid"></div>
                                                    <div class="glyphicon glyphicon-remove form-glyphicon" ng-show="gas.calorific.$dirty && gas.calorific.$invalid"></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row form-group" ng-if="model.DeliveryName === '其他'" style="width: 95%; margin-left: 3%; margin-right: 0; background-color: #f4f3f2;height:50px;padding-top:8px;">
                                            <div class="col-md-4" ng-if="model.DeliveryName === '其他'" style="width:50%;">
                                                <label class="control-label col-md-3" style="width: 54%; margin-left: -9px; padding-right: 0;padding-left:1px;"><span class="colorRed">*</span>其他气源所在区域：</label>
                                                <select class="form-control col-md-4" ng-model="model.C_GasZoneID" id="C_GasZoneID"
                                                        ng-options="item.C_ZoneID as item.C_ZoneName for item in baseData.Zone" style="width: 44%;background-color:white;padding-right:6px;">
                                                    <option value="">请选择</option>
                                                </select>
                                            </div>
                                            <div class="col-md-4" ng-if="model.DeliveryName === '其他'" style="width:50%;padding-right:14px;">
                                                <label class="control-label col-md-3" style="width: 46%; padding-left:17px; padding-right: 0px; text-align: left;"><span class="colorRed">*</span>其他气源名称：</label>
                                                <input class="form-control col-md-4" ng-model="model.C_GasSourceName" style="background-image:none; width: 54%;background-color:white;" />
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <div ng-class="{'has-error':gas.temperature.$dirty && gas.temperature.$invalid}">
                                                    <label class="control-label col-md-4" style="padding-right:5px;width:44%;"><span class="colorRed">*</span>液温：</label>
                                                    <select class="form-control col-md-8" ng-model="model.C_LiquidTemperature" style="padding-left:6px;margin-left:1px;width:54.6%;padding-right:6px;" id="C_LiquidTemperature" name="temperature"
                                                            ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.LiquidTemperature" required>
                                                        <option value="">请选择</option>
                                                    </select>
                                                    <div class="glyphicon glyphicon-ok form-glyphicon" ng-show="gas.temperature.$dirty && gas.temperature.$valid"></div>
                                                    <div class="glyphicon glyphicon-remove form-glyphicon" ng-show="gas.temperature.$dirty && gas.temperature.$invalid"></div>
                                                </div>
                                            </div>
                                            <div class="col-md-4" style="width:36%">
                                                <label class="control-label col-md-4" style="padding-right:2px;width:38%;margin-left:-11px;text-align:left;padding-left:1px;"><span class="colorRed">*</span>到岸报价：</label>
                                                <input class="form-control col-md-6" type="text" style="border: 1px solid #ff6400; width: 49%; background-image: none; margin-left: 0px; background-color: #ff6400; color: white; " maxlength="4" ng-model="model.C_Price" ng-pattern="/^[3-6]\d{3}$/" autocomplete="off" />
                                                <label class="control-label" style="font-weight:normal;">&nbsp;元/吨</label>
                                            </div>
                                            <div class="col-md-4" style="width:30%">
                                                <label class="control-label col-md-5" style="width: 41%;padding-right:1px;">付款方式：</label>
                                                <select class="form-control col-md-7" ng-model="model.C_TypeOfPay" id="C_TypeOfPay" style="width:59%;padding-right:6px;padding-left:4px;" name="temperature"
                                                        ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.TypeOfPay" required>
                                                    <option value="">请选择</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <div class="col-md-4">
                                                <label class="control-label col-md-5" style="width: 45%;padding-right:6.5px;">车头类型：</label>
                                                <select class="form-control col-md-7" ng-model="model.C_TypeOfCarFuel" id="C_TypeOfCarFuel" style="width:54.5%;padding-left:6px;padding-right:6px;" name="temperature"
                                                        ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.TypeOfCarFuel" required></select>
                                            </div>
                                            <div class="col-md-4">
                                                <label class="control-label col-md-5" style="padding-right:0;margin-left:-14px;">车辆罐容：</label>
                                                <input class="form-control col-md-6" type="text" style="background-image:none;width:53%;margin-left:3px;" ng-model="model.C_Tonnage" required/>
                                                <label class="control-label col-md-1" style="font-weight:normal;">&nbsp;m³</label>
                                            </div>
                                            <div class="col-md-4" style="padding-right:1px;">
                                                <label class="control-label col-md-5" style="padding-right:0;">押车标准：</label>
                                                <select class="form-control col-md-7" ng-model="model.C_StandardOfYaChe" id="C_StandardOfYaChe" style="padding-right: 6px; width: 49%; margin-left: 1px; padding-left: 4px;" name="temperature"
                                                        ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.StandardOfYaChe" required></select>
                                            </div>
                                        </div>
                                        <div class="row form-group">
                                            <label class="control-label col-md-3" style="text-align:left;padding-left:19px;">
                                                <span ng-if="model.C_TypeOfCarFuel == 1">油头车气差处理：</span>
                                                <span ng-if="model.C_TypeOfCarFuel == 2">气头车气差处理：</span>
                                                <span ng-if="model.C_TypeOfCarFuel == 3">气差处理：</span>
                                            </label>
                                            <select class="form-control col-md-7" style="padding-left:15px;margin-left:-2.6em;padding-right:6px;padding-left:5px;" ng-model="model.C_ProcessOfGasDifference" id="C_ProcessOfGasDifference" name="temperature"
                                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.ProcessOfGasDifference" required></select>
                                        </div>
                                        <!--<div class="row form-group">
                                            <label class="control-label col-md-3" style="text-align:left;">油头车气差处理：</label>
                                            <select class="form-control col-md-7" style="padding-left:15px;margin-left:-2em;" ng-model="model.C_ProcessOfCarGasDifference" id="C_ProcessOfCarGasDifference" name="temperature"
                                                    ng-options="item.NAME as item.DISPLAY_NAME for item in baseData.ProcessOfCarGasDifference" required>
                                                <option>请选择</option>
                                            </select>
                                        </div>-->
                                        <div class="row form-group">
                                            <div class="col-md-4" style="padding-left:15px;">
                                                <button class="btn btnRed col-md-5" style="width:80px;" ng-click="addQuotePriceToList()">{{model.AddOrEdit}}</button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="table-responsive marginTop15px" style="overflow-x:visible;">
                                        <table class="table blueTable">
                                            <thead>
                                                <tr>
                                                    <th style="width:58%">气源信息</th>
                                                    <th style="width:23%">报价（元/吨）</th>
                                                    <th>操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr ng-repeat="item in QuotePriceList | filter: deletedFilter">
                                                    <td style="width:310px;">
                                                        <div style="color:black;"><span class="gasInformation">{{item.C_GasSourceName}};</span><span class="gasInformation">{{item.C_GasificationRate}};</span><span class="gasInformation">{{item.C_CalorificValue}};</span><span class="gasInformation">{{item.C_LiquidTemperature_Name}};</span></div>
                                                        <div style="color:grey;"><span class="gasInformation">{{item.C_TypeOfPay_Name}};</span><span class="gasInformation">{{item.C_TypeOfCarFuel_Name}};</span><span class="gasInformation">{{item.C_Tonnage}};</span><span class="gasInformation">{{item.C_StandardOfYaChe_Name}};</span></div>
                                                        <div style="color:grey;"><span class="gasInformation">{{item.C_ProcessOfGasDifference_Name}}</span></div>
                                                    </td>
                                                    <td class="textCenter" style="font-weight:bold;color:#ff6400;font-size:18px;">{{item.C_Price}}</td>
                                                    <td class="textCenter" style="width:135px;">
                                                        <div class="btnRed" ng-click="editQuote($index)" style="background-color:white;color:#0065e6;float:left;margin-left:12px;">编辑</div>
                                                        <div class="btnRed" ng-click="removeQuotePrice($index)" style="background-color: white; color: #0065e6">删除</div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btnRed" ng-click="saveQuotePrice()" style="width:80px;margin-left:3px;">确认提交</button>
                                    <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="InitData()" style="width:80px;">取消</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="placeHolderFooter" ng-include src="footerHtml"></div>

    <script src="js/bootstrap.min.js" defer async="async"></script>
    <script src="js/angular.min.js"></script>
    <script src="js/angular-cookies.min.js"></script>
    <script src="js/angular-sanitize.min.js"></script>
    <script src="js/layer/layer.js"></script>
    <script src="js/site.js"></script>
</body>
</html>
